package com.hagos;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.view.View;
import java.util.Date;

public class Now extends Activity implements View.OnClickListener{
    /** Called when the activity is first created. */

    Button button;

    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        
	button = new Button(this);
	button.setOnClickListener(this);
	updateTime();
	setContentView(button);
    }

    public void onClick(View view) {
	updateTime();
    }

    private void updateTime(){
	button.setText(new Date().toString());
    }
}

